package cn.sdack.go.users.dao;

import cn.sdack.go.common.entities.users.UserRoleEntity;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @author sdack
 * @date 2024/1/8
 */
public interface UserRoleDao extends JpaRepository<UserRoleEntity,Long> {

    List<UserRoleEntity> findAllByGidAndRoleCodeAndDelIsNull(long gid,String key);

    List<UserRoleEntity> findAllByGidAndUserIdAndDelIsNull(long gid,Long userId);

    List<UserRoleEntity> findAllByGidAndRoleCodeInAndDelIsNull(long gid,List<String> codes);

}
